<?php if(!defined('BASEPATH')) exit('No direct script access allowed');

require APPPATH . '/libraries/BaseController.php';
/**
 * Class : User (UserController)
 * User Class to control all user related operations.
 * @author : Kishor Mali
 * @version : 1.1
 * @since : 15 November 2016
 */
class Test extends BaseController
{
    /**
     * This is default constructor of the class
     */
    public function __construct()
    {
        parent::__construct();
        $this->load->model('user_model');
        $this->isLoggedIn();   
    }

    public function index(){
        $this->load->library("hei_excel");
        
        $data = [
            'A1' => '公司名称', 'B1' => '项目名称', 'C1' => '立项时间', 'D1' => '项目地址', 'E1' => '技术负责人', 'F1' => '手机号',
            'A2' => 'company_name', 'B2' => 'project_name',
            'C2' => 'create_time', 'D2' => 'address',
            'E2' => 'tec_leader_name', 'F2' => 'tec_leader_phone',
            'A4' => '项目状态', 'B4' => '抽签时间', 'C4' => '预计抽检时间', 'D4' => '抽检人员', 'E4' => '职务', 'F4' => '手机号',
            'A5' => 'status_name', 'B5' => 'draw_date',
            'C5' => 'plan_samp_date', 'D5' => 'samp_user_name',
            'E5' => 'samp_user_job', 'F5' => 'samp_user_phone',
            'A7' => '分数', 'B7' => '检查时间',
            'A8' => 'score', 'B8' => 'samp_date',
            'A10' => '检查项', 'B10' => '检查楼层',
        ];
        $options = [
            'print' => true,//打印格式
            'alignCenter' => array_keys($data),//居中
            'setWidth' => ['A'=>30, 'B'=>30, 'C'=>30, 'D'=>30, 'E'=>30, 'F'=>30],
            'setARGB' => ['A1'],
            'bold' => [
                'A1', 'B1', 'C1', 'D1', 'E1', 'F1', 'A4', 'B4', 'C4', 'D4', 'E4', 'F4', 'A7', 'B7', 'C7', 'D7', 'E7', 'F7', 'A10', 'B10'
            ],//加粗
        ];
        // $this->hei_excel->exportExcel($data, '黑爷爷.xlsx', $options);
        $this->global['pageTitle'] = 'CodeInsect : Dashboard';
        
        $this->loadViews("dashboard", $this->global, NULL , NULL);
    }

    
    
}

?>